package com.fis.vaadin.validator;

import com.vaadin.data.validator.IntegerValidator;

public class CheckValueCycleValidator extends IntegerValidator {
	private Integer val;

	public CheckValueCycleValidator(String errorMessage) {
		super(errorMessage);
	}

	@Override
	protected boolean isValidString(String value) {
		try {
			try {
				val = Integer.parseInt(value);
				return (val > 0);
			} catch (Exception e) {
				return true;
			}
		} catch (Exception e) {
			return false;
		}
		// return true;
	}
}
